<admintpl file="header" />
<link href="__TMPL__Public/assets/css/infomation.css" rel="stylesheet" />
<link type="text/css" href="__PUBLIC__/js/select2/select2.min.css" rel="stylesheet" />
<style type="text/css">
.mll2{ float: left;margin-left: 20px}
.mll{ float: left; margin-left: 600px }
</style>
</head>
<body>
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li><a href="{:U('WorkContactList/index')}">工作联系单管理</a></li>
            <li class="active"><a href="{:U('WorkContactList/add')}">新增工作联系单</a></li>
        </ul> 
        <section class="tab-pane active fade in" id="access">
            <div class="row">
                <div class="col-xs-12 col-md-12 col-lg-12">
                    <div class="panel panel-info">
                        <div class="panel-body">
                            <form method="post" class="form-horizontal " action="{:U('WorkContactList/add_post')}">
                                <input type="hidden" name="audit_level" value="2" >
                                <div class="row tg-header">
                                    <div class="col-md-12 text-center">
                                        <h3>工作联系单</h3>
                                        <hr />
                                    </div>
                                    <div>
                                        <p class="pull-right tg-serialnum"><label>编号:</label><input class="input-xt" name="code" /></p>
                                    </div>
                                    <div class="col-md-12">
                                        <p class="tg-to"><label>工程名称:</label><input type="text" class="input-xt input-deptname"  disabled value="{$job_name}" /></p>

                                        <p class="pull-right tg-serialnum"><label>建设单位:</label><input class="input-xt" name="construction_department" value="杭州市中医院" /></p>
                                    </div>
                                    <!-- <div class="col-md-12">
                                        <p class="tg-to"><label>提报部门:</label>
                                           <select name="put_forward_department" >
                                               <foreach name="Department" item="vo">
                                                   <option value="{$vo.id}">{$vo.department_name}</option>
                                               </foreach>
                                           </select>
                                    </div> -->
                                </div>


                                <table class="table table-bordered">
                                    <tr>
                                        <td style="border-right:none !important;">
                                            
                                                <p>
                                                    <label>事由：
                                                    </label>
                                                    <textarea style="height: 200px;width: 100%" name="main_content"></textarea>
                                                </p>
                                                <p>
                                                    <label>附件：</label>
                                                    <div class="controls">
                                                        <a class="btn upBtn btn-primary" href="javascript:void(0);">上传</a>
                                                        <input type="file" id="upFile" name="upFile" style="display:none" />
                                                    </div>
                                                </p>      
                                                <p>
                                                    <span class="mll2">项目经办：</span>
                                                    <span class="mll">项目经理：</span>
                                                    <div class="signature-date" style="margin-right: 200px !important">
                                                        <input type="text" class="js-date input-xt input-date" name="publish_time" value="<php>echo date('Y-m-d');</php>" required />
                                                    </div>
                                                </p>         
                                        </td>
                                    </tr>
                                </table>
                                <div class="form-actions">
                                    <button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button>
                                    <a class="btn btn-default" href="javascript:history.back(-1);">{:L('BACK')}</a>
                                </div>
                            </form>                   
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
    <script src="__PUBLIC__/js/common.js"></script>
    <script src="__PUBLIC__/js/select2/select2.min.js"></script>
    <script src="__PUBLIC__/js/select2/i18n/zh-cn.js"></script>
    <script src="__PUBLIC__/js/select2/select2.default.js"></script>
    <script type="text/javascript">
        $(document).ready(function (e) {
            $("select[name='contact_sheet_reporting_department']").change(function () {
                $("input[name='examination_and_approval_department']").val($("select[name='contact_sheet_reporting_department']").find("option:selected").text());
            });
            $("input[name='contact_sheet_code']").keyup(function () {
                $("input[id='code']").val($("input[name='contact_sheet_code']").val());
            });
        });
        $(function () {
            $(".select2").select2();
        });
    </script>
    <script type="text/javascript">
        $(document).ready(function(e) {
            window.obj = '';
            // 选择图片
            $(document).on("click", ".upBtn", function(e) {
                window.obj = $(this);
                $("#upFile").click();
            });
            // 文件选择器change事件
            /*$("#upFile").on("change", function(){
                UploadOneFile("{:U('WorkContactList/upload')}", "work_contact_list");
            });*/
            // 文件选择器change事件
            $("#upFile").on("change", function(){
                UploadFile("{:U('WorkContactList/upload')}", "work_contact_list");
            });
            $(document).on("click", ".delFile", function(){
                if($(this).attr("value") != undefined){
                    delFile("{:U('WorkContactList/delFile')}", $(this).attr("value"), $(this))
                } else {
                    $(this).closest("div").remove();
                }
            });
        });
    </script>
</body>
</html>